do awerror WITH ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO()
talkz
safetyz
defaultzF
foxtools
code2
Select an html source file
.HTML
Wrong file type.
Please choose an HTML, HTM, or TXT file.
Please choose an HTML, HTM, or TXT file file.
or press Escape to quit
Pick a database
Cancelled
screens\pickdbf.spr
screens\SELECT.SPR
temp.prg
temp.fxp
temp.prg
OLDTALK
OLDSAFE
OLDDEF
IS_FOXTOOLQUIT
FOXTOOLS
CODE2
IS_HTML
FILE_NAME
FXALERT
OLFILE_HANDLHTMLSTR
HANDLDBFS
DBFPICK
SCREENS
FIELD_AR
LENGTH
FPCK1
FPCK2
DELIM
FILENAME
LINKNAME
PRG_OUT
MYPRG
F_FXP
F_PRG
FOXTOOLSF
Error!F
Sorry an error occured....
Error number
Line number of error:
Program name:
Andrew Warner
awarner@sysplan.com
703 351-8298
MERROR
MESS1
MPROG
MLINENO
OLIS_FOXTOOLAWERROR
TALKz
COMPATIBLEz
READBORDERz
_r9417roe8
Geneva
_r9417roe8
Select a database file:
Geneva
@ 2.917,3.333 GET dbfpick PICTURE "@&N3" FROM dbfs SIZE 7.000,17.500 DEFAULT 1 FONT "Geneva", 10
Geneva
@*HT2 O.K.
Geneva
@*HN2 Cancel
_r9417roe8
SET READBORDER &rborder
CURRAREA
TALKSTAT
COMPSTAT
RBORDER
_R9417ROE8OK1
17ROE8QUITBTN
_R9417RQ8W
_R9417RQ8W
TALKz
COMPATIBLEz
READBORDERz
_r9417z3hz
Geneva
_r9417z3hz
dbf-to-html
Geneva
@ 7.417,39.333 GET m.fpck2 PICTURE "@&N3" FROM field_ar RANGE 1 SIZE 7.000,25.000 DEFAULT 1 FONT "Geneva", 10
Select the field for F
the hyperlink display:
Geneva
Geneva
@*HT2 O.K.
Geneva
@*HN2 Cancel
Enter the html field F
delimiter character(s):
Geneva
Geneva
@ 7.417,3.333 GET m.fpck1 PICTURE "@&N3" FROM field_ar RANGE 1 SIZE 7.000,25.000 DEFAULT 1 FONT "Geneva", 10
Select the field for F
html file names:
Geneva
K7I0@
Geneva
This Part
Geneva
Geneva
@3KK
HTML file extension:
Geneva
Copyright 1995 Andrew Warner awarner@cais.com
Geneva
Geneva
_r9417z3hz
SET READBORDER &rborder
CURRAREA
TALKSTAT
COMPSTAT
RBORDER
_R9417Z3HZQUIT
417Z3HZQUITBTN
_R9417Z6OSDELIM
_R9417Z72OEXT
_R9417Z7KQ
{Ctrl-A}
{Ctrl-A}
_R9417Z6OS
_R9417Z72O
_R9417Z7KQ
pre 357 post 382
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\"
htmlpath=path+"html_output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=IIF(UPPER(LEFT(LTRIM(REDUCE(field)),4))="THE ",substr(field,5),field)
field=IIF(UPPER(LEFT(LTRIM(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
field=chrtran(LEFT(field,m.length)," ","")+".html"
field=chrtran(field(
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
@*HT2
GENDTEXT &&---------- ...AND ABOVE THIS LINE
=FCLOSE(_TEXT)
IF .F. && couldn't get this to work
type="TEXT"
creator="ttxt"
fx=FxSetType((file_name),type,creator)
IF fx != 0
wait window "Error trying to set file typr and creator"
ENDIF
*Syntax: FxSetType(, , )
ENDIF
ENDSCAN
***************
********************* End SCAN of dbf *************************
***************
* create index.html file
file_name = htmlpath+"index.html"
handle=FCREATE(file_name)
=FWRITE(handle,indexStr)
=FCLOSE(handle)
PROCEDURE problem
PARAMETER file_handle
* check for successful file create:
IF file_handle < 0
DO CASE
CASE FERROR() =4
reason ="too many files open"
CASE FERROR() =5
reason ="Acces denied"
CASE FERROR() =8
reason ="out of memory"
CASE FERROR() =29
reason ="Disk Full"
CASE FERROR() =31
reason ="General Failure"
ENDCASE
WAIT WINDOW " PROBLEM : no "+ reason
ENDIF
RETURN
Pick a database:
Geneva
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\"
htmlpath=path+"html_output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=IIF(UPPER(LEFT(LTRIM(REDUCE(field)),4))="THE ",substr(field,5),field)
field=IIF(UPPER(LEFT(LTRIM(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
field=chrtran(LEFT(field,m.length)," ","")+".html"
field=chrtran(field, chr(39) ,"")
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
the curriculum in 1995 is an Academic Resource Center and th
v*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"html_output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
field=chrtran(LEFT(field,m.length)," ","") && filter out spaces
field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
{ENDTEXT &&---------- ...AND ABOVE THIS LINE
*this code mess is copyright 1995 by Andrew Warner
=FCLOSE(_TEXT)
IF .F. && couldn't get this to work
type="TEXT"
creator="ttxt"
fx=FxSetType((file_name),type,creator)
IF fx != 0
wait window "Error trying to set file typr and creator"
ENDIF
*Syntax: FxSetType(, , )
ENDIF
ENDSCAN
***************
********************* End SCAN of dbf *************************
***************
* create index.html file
file_name = htmlpath+"index.html"
handle=FCREATE(file_name)
=FWRITE(handle,indexStr)
=FCLOSE(handle)
PROCEDURE problem
PARAMETER file_handle
* check for successful file create:
IF file_handle < 0
DO CASE
CASE FERROR() =4
reason ="too many files open"
CASE FERROR() =5
reason ="Acces denied"
CASE FERROR() =8
reason ="out of memory"
CASE FERROR() =29
reason ="Disk Full"
CASE FERROR() =31
reason ="General Failure"
ENDCASE
WAIT WINDOW " PROBLEM : no "+ reason
ENDIF
RETURN
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"html_output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
field=chrtran(LEFT(field,m.length)," ","") && filter out spaces
field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
&ENDTEXT &&---------- ...AND ABOVE THIS LINE Nothing can go above this line
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
=FCLOSE(_TEXT)
*IF .F. && couldn't get this to work
type="TEXT"
creator="ttxt"
fx=FxSetType((filewrite),type,creator)
IF fx != 0
wait window "Error trying to set file typr and creator"
ENDIF
*Syntax: FxSetType(, , )
*ENDIF
ENDSCAN
***************
********************* End SCAN of dbf *************************
***************
* create index.html file
file_name = htmlpath+"index.html"
handle=FCREATE(file_name)
=FWRITE(handle,indexStr)
=FCLOSE(handle)
PROCEDURE problem
PARAMETER file_handle
* check for successful file create:
IF file_handle < 0
DO CASE
CASE FERROR() =4
reason ="too many files open"
CASE FERROR() =5
reason ="Acces denied"
CASE FERROR() =8
reason ="out of memory"
CASE FERROR() =29
reason ="Disk Full"
CASE FERROR() =31
reason ="General Failure"
ENDCASE
WAIT WINDOW " PROBLEM : "+ reason
ENDIF
RETURN+ reason
ENDIF
RETURNon and ecology. We offer small classes, structure, and indi
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"html_output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
*field=chrtran( left(field,m.length ) ," ","") && filter out spaces
field=chrtran( iif ( ! empty(m.length), left(field,val(m.length) ) ," ","") && filter out spaces
field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
isk Full
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
field=ALLTRIM(&fieldname)
fullfield=field && need full field contents for < a href= > fullfield
IF is_foxtools
field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
*field=chrtran( left(field,m.length ) ," ","") && filter out spaces
field= iif ( ! empty(m.length), left(field,val(m.length)), field)
field=chrtran( field ," ","") && filter out spaces
field=chrtran(field,"'" ,"")+".html" && filter out single quotes
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
E t.....
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*filename=alltrim(field_ar[m.fpck1,1])
*linkname=alltrim(field_ar[m.fpck2,1])
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
linkname=ALLTRIM(&linkname)
&& need full field contents for < a href= > linkname
*IF is_foxtools
* field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
*ELSE
* field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
*ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
*field=chrtran( left(field,m.length ) ," ","") && filter out spaces
field= iif ( ! empty(m.length), left(field,val(m.length)), field)
field=chrtran( field ," ","") && filter out spaces
field=chrtran(field,"'" ,"")+".html" && filter out single quotes
* path + file name:
file_name = htmlpath+field
* get a file handle for low level file io:
_TEXT=FCREATE(file_name)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*filename=alltrim(field_ar[m.fpck1,1])
*linkname=alltrim(field_ar[m.fpck2,1])
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
set step on
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
linkname=&linkname
&& need full field contents for < a href= > linkname
*IF is_foxtools
* field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field)
*ELSE
* field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field)
*ENDIF
* chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names...
* LEFT(field,20) limits file name to 25 chracters...
* add ".html" extension to so we can use school as file name:
*field=chrtran( left(field,m.length ) ," ","") && filter out spaces
filename=&filename
filename= iif ( ! empty(m.length), left(filename,val(m.length)), field)
filename=chrtran( filename ," ","") && filter out spaces
filename=chrtran(field,"'" ,"")+".html" && filter out single quotes
* path + file name:
filename= htmlpath+filename
* get a file handle for low level file io:
_TEXT=FCREATE(filename)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+linkname+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
The company is an authorized Florian
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*filename=alltrim(field_ar[m.fpck1,1])
*linkname=alltrim(field_ar[m.fpck2,1])
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
link=&linkname
link=alltrim(link)
file=&filename
file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces
* path + file name:
filewrite= htmlpath+file
* get a file handle for low level file io:
_TEXT=FCREATE(filewrite)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+link+"
"+LF
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
.....
") && filter out spaces
file=&filename
*filename= iif ( ! empty(m.length), left(filename,val(m.length)), field)
*filename=chrtran( filename ," ","") && filter out spaces
file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces
* path + file name:
filewrite= htmlpath+file
* get a file handle for low level file io:
_TEXT=FCREATE(filewrite)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+link+"
"+chr(13)
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
BELOW THIS LINE t.....
and incorporated in 1984. The company employs
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=path+"output\" && path variable set in calling program
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*filename=alltrim(field_ar[m.fpck1,1])
*linkname=alltrim(field_ar[m.fpck2,1])
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
link=&linkname
link=alltrim(link)
file=&filename
file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces
* path + file name:
filewrite= htmlpath+file
* get a file handle for low level file io:
_TEXT=FCREATE(filewrite)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+link+"
"+LF
IF mod(recno(),10)=0
WAIT WINDOW NOWAIT "Records processed: "+alltrim(str(recno()))
ENDIF
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\"
* this code mess is copyright 1995 by Andrew Warner
htmlpath=sys(2027,path+"output\" ) && path variable set in calling program, sy
set textmerge delimiters to (m.delim)
set textmerge on
indexStr=""
*filename=alltrim(field_ar[m.fpck1,1])
*linkname=alltrim(field_ar[m.fpck2,1])
*****************
********************* Begin SCAN of dbf *************************
*****************
GO TOP
SCAN
* get rid of "the " in school name...
* REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces...
* no big deal if you don't have foxtools.mlb
link=&linkname
link=alltrim(link)
file=&filename
file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces
* path + file name:
filewrite= htmlpath+file
* get a file handle for low level file io:
_TEXT=FCREATE(filewrite)
IF _TEXT < 0
DO problem with (_TEXT)
ENDIF
* This will be used to create an html
* index file for all the html created:
indexStr= indexStr+""+link+"
"+LF
IF mod(recno(),10)=0
WAIT WINDOW NOWAIT "Records processed: "+alltrim(str(recno()))
ENDIF
TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t.....
EENDTEXT &&---------- ...AND ABOVE THIS LINE Nothing can go above this line
* htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved.
* This code is copyright 1995 by Andrew Warner, all rights reserved.
* Code2.memo
=FCLOSE(_TEXT)
IF is_foxtools &&requires foxtools
type="TEXT"
creator="ttxt"
fx=FxSetType((filewrite),type,creator)
IF fx != 0
wait window "Error trying to set file typr and creator"
ENDIF
*Syntax: FxSetType(, , )
ENDIF
ENDSCAN
***************
********************* End SCAN of dbf *************************
***************
* create index.html file
file_name = htmlpath+"index.html"
handle=FCREATE(file_name)
=FWRITE(handle,indexStr)
=FCLOSE(handle)
IF is_foxtools &&requires foxtools
type="TEXT"
creator="ttxt"
fx=FxSetType((file_name),type,creator)
IF fx != 0
wait window "Error trying to set file typr and creator"
ENDIF
*Syntax: FxSetType(, , )
ENDIF
PROCEDURE problem
PARAMETER file_handle
* check for successful file create:
IF file_handle < 0
DO CASE
CASE FERROR() =4
reason ="too many files open"
CASE FERROR() =5
reason ="Acces denied"
CASE FERROR() =8
reason ="out of memory"
CASE FERROR() =29
reason ="Disk Full"
CASE FERROR() =31
reason ="General Failure"
ENDCASE
WAIT WINDOW " PROBLEM : "+ reason
ENDIF
RETURNe.PRG
MODIFY FILE "APSDrive:FoxPro:Andrew:new sequehtValerieSRC\screens\MAIN.PRG
MacintoshHD:\Temporary Items\
MAIN.FXP
htValerieSRC\screens\PICKDBF.SPR
PICKDBF.SPX
htValerieSRC\screens\SELECT.SPR
SELECT.SPX
MacintoshHD:\Applications\Microsoft FoxPro 2.6\htValerieSRC\code\
code2.DBF
code2.FPT